package com.wswy.wzcx.model.topic

import android.os.Parcel
import android.os.Parcelable
import com.google.gson.annotations.SerializedName


class TopicTagType (@SerializedName("id") val id:String?,
                         @SerializedName("name") val name:String?):Parcelable{
    constructor(parcel: Parcel) : this(
            parcel.readString(),
            parcel.readString()) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(id)
        parcel.writeString(name)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<TopicTagType> {
        override fun createFromParcel(parcel: Parcel): TopicTagType {
            return TopicTagType(parcel)
        }

        override fun newArray(size: Int): Array<TopicTagType?> {
            return arrayOfNulls(size)
        }
    }
}